import QtQuick 2.0
import QtQuick.Window 2.12
import QtQuick.Layouts 1.1
import "../components"

Window {
    id: root
    title: qsTr("温度")

    modality: Qt.WindowModal
    flags: Qt.Window | Qt.WindowTitleHint |Qt.WindowSystemMenuHint | Qt.WindowCloseButtonHint

    minimumWidth: 420*dp
    minimumHeight: 480*dp
    maximumWidth: 420*dp
    maximumHeight: 480*dp


    Column{
        x: 20*dp
        y: 20*dp
        Rectangle{
            color: "#EBEDF0"
            height: 60*dp
            width: 380*dp
            Rectangle{
                color: "#F7F8FA"
                height: 60*dp-1
                width: 190*dp-1
                x:1
                y:1
                Text {
                    text: "区域"
                    anchors.centerIn: parent
                }
            }Rectangle{
                color: "#F7F8FA"
                x: 190*dp+1
                y: 1
                height: 60*dp-1
                width: 190*dp-2
                Text {
                    text: "温度"
                    anchors.centerIn: parent
                }
            }
        }Rectangle{
            color: "#EBEDF0"
            height: 50*dp
            width: 380*dp
            Rectangle{
                height: 50*dp-1
                width: 190*dp-1
                x:1
                y:1
                Text {
                    text: "A"
                    anchors.centerIn: parent
                }
            }Rectangle{
                x: 190*dp+1
                y: 1
                height: 50*dp-1
                width: 190*dp-2
                clip: true
                Text{
                    text: tempA
                    anchors.centerIn: parent
                }
            }
        }Rectangle{
            color: "#EBEDF0"
            height: 50*dp
            width: 380*dp
            Rectangle{
                height: 50*dp-1
                width: 190*dp-1
                x:1
                y:1
                Text {
                    text: "B"
                    anchors.centerIn: parent
                }
            }Rectangle{
                x: 190*dp+1
                y: 1
                height: 50*dp-1
                width: 190*dp-2
                clip: true
                Text{
                    text: tempB
                    anchors.centerIn: parent
                }
            }
        }Rectangle{
            color: "#EBEDF0"
            height: 50*dp
            width: 380*dp
            Rectangle{
                height: 50*dp-1
                width: 190*dp-1
                x:1
                y:1
                Text {
                    text: "C"
                    anchors.centerIn: parent
                }
            }Rectangle{
                x: 190*dp+1
                y: 1
                height: 50*dp-1
                width: 190*dp-2
                clip: true
                Text{
                    text: tempC
                    anchors.centerIn: parent
                }
            }
        }Rectangle{
            color: "#EBEDF0"
            height: 50*dp
            width: 380*dp
            Rectangle{
                height: 50*dp-1
                width: 190*dp-1
                x:1
                y:1
                Text {
                    text: "D"
                    anchors.centerIn: parent
                }
            }Rectangle{
                x: 190*dp+1
                y: 1
                height: 50*dp-1
                width: 190*dp-2
                clip: true
                Text{
                    text: tempD
                    anchors.centerIn: parent
                }
            }
        }Rectangle{
            color: "#EBEDF0"
            height: 50*dp
            width: 380*dp
            Rectangle{
                height: 50*dp-1
                width: 190*dp-1
                x:1
                y:1
                Text {
                    text: "E"
                    anchors.centerIn: parent
                }
            }Rectangle{
                x: 190*dp+1
                y: 1
                height: 50*dp-1
                width: 190*dp-2
                clip: true
                Text{
                    text: tempE
                    anchors.centerIn: parent
                }
            }
        }Rectangle{
            color: "#EBEDF0"
            height: 50*dp
            width: 380*dp
            Rectangle{
                height: 50*dp-2
                width: 190*dp-1
                x:1
                y:1
                Text {
                    text: "F"
                    anchors.centerIn: parent
                }
            }Rectangle{
                x: 190*dp+1
                y: 1
                height: 50*dp-2
                width: 190*dp-2
                clip: true
                Text{
                    text: tempF
                    anchors.centerIn: parent
                }
            }
        }
    }

    RowLayout{
        width: parent.width
        height: 20*dp
        y: 400*dp
        spacing: 20*dp
        CustomHorSpacerItem{}
        PushButton{
            title: "关闭"
            defaultMode2: true
            onReleased: {
                close()
            }
        }
        CustomHorSpacerItem{}
    }


}
